package com.ouwen.smartpay.service.chain.slots;

import com.fm.core.common.facade.MerchResultBase;
import com.ouwen.smartpay.openapi.order.ServiceOrder;
import com.ouwen.smartpay.openapi.result.ServiceResult;

/**
 * @author <a href="http://youngitman.tech">青年IT男</a>
 * @version v1.0.0
 * @className SoltArgsToObjects
 * @description
 * @JunitTest: {@link  }
 * @date 2020-04-28 16:29
 **/
public class SoltArgsToObjects {

    public static ServiceResult toServiceResult(Object... args) {

        Object[] objects = (Object[]) args[1];

        Object result = objects[0];

        ServiceResult serviceResult = (ServiceResult) result;

        return serviceResult;
    }

    public static MerchResultBase toMerchResult(Object... args) {

        Object object =  args[2];

        MerchResultBase bizResult = (MerchResultBase) object;

        return bizResult;
    }

    public static ServiceOrder toServiceOrder(Object... args) {

        return (ServiceOrder)args[0];
    }
}
